package com.ruoyi.project.loan.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 贷款申请对象 loan_application
 *
 * @author ruoyi
 * @date 2025-11-11
 */
public class LoanApplication extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long applicationId;

    /**
     * 申请人ID
     */
    @Excel(name = "申请人ID" )
    private Long userId;

    /**
     * 产品ID
     */
    @Excel(name = "产品ID" )
    private Long productId;

    /**
     * 申请金额
     */
    @Excel(name = "申请金额" )
    private Long applyAmount;

    /**
     * 贷款期限(月)
     */
    @Excel(name = "贷款期限(月)" )
    private Long loanTerm;

    /**
     * 借款用途
     */
    @Excel(name = "借款用途" )
    private String purpose;

    /**
     * 状态
     */
    @Excel(name = "状态" )
    private String status;

    /**
     * 申请时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date applyTime;

    /**
     * 审批时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date approvalTime;

    public Long getApplicationId() {
        return applicationId;
    }

    public void setApplicationId(Long applicationId) {
        this.applicationId = applicationId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getApplyAmount() {
        return applyAmount;
    }

    public void setApplyAmount(Long applyAmount) {
        this.applyAmount = applyAmount;
    }

    public Long getLoanTerm() {
        return loanTerm;
    }

    public void setLoanTerm(Long loanTerm) {
        this.loanTerm = loanTerm;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public Date getApprovalTime() {
        return approvalTime;
    }

    public void setApprovalTime(Date approvalTime) {
        this.approvalTime = approvalTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("applicationId", getApplicationId())
                .append("userId", getUserId())
                .append("productId", getProductId())
                .append("applyAmount", getApplyAmount())
                .append("loanTerm", getLoanTerm())
                .append("purpose", getPurpose())
                .append("status", getStatus())
                .append("applyTime", getApplyTime())
                .append("approvalTime", getApprovalTime())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
